<template>
  <div :class="prefixCls">
    <div class="flex items-center absolute right-4 top-4">
      <AppDarkModeToggle class="enter-x mr-2" v-if="!sessionTimeout" />
    </div>
    <!-- <div class="login-header">
      <a class="login-company-logo" target="_blank" href="https://www.jnpfsoft.com">
        <img class="login-company-logo-img -enter-x" src="../../../assets/images/login-company-logo.png" alt="" />
      </a>
    </div> -->
    <div class="login-content">
      <!-- <div class="login-left hidden xl:block">
        <LoginFormTitle class="-enter-x" />
        <img class="login-banner -enter-x" src="../../../assets/images/login-banner.png" alt="" />
      </div> -->
      <div :class="`${prefixCls}-form`" class="enter-x h-630px xl:h-full">
        <!-- <LoginFormTitle class="-enter-x xl:hidden" /> -->
        <LoginForm />
        <div class="single-form-footer-actions flex">
          <Space class="mr-auto">或<Button type="link" @click="gotoSignup">创建企业</Button></Space>
          <Space><Button type="link" @click="gotoForgot">忘记密码</Button></Space>
        </div>
      </div>
    </div>
    <div class="copyright">{{ getSysConfig.copyright }}</div>
  </div>
</template>
<script lang="ts" setup>
  import { computed } from 'vue';
  import { Space, Button } from 'ant-design-vue';
  import { AppDarkModeToggle } from '/@/components/Application';
  import LoginFormTitle from './LoginFormTitle.vue';
  import LoginForm from './LoginForm.vue';
  import { useDesign } from '/@/hooks/web/useDesign';
  import { useAppStore } from '/@/store/modules/app';
  import { useRouter } from 'vue-router';
  
  defineProps({
    sessionTimeout: {
      type: Boolean,
    },
  });
  const router = useRouter();
  const { prefixCls } = useDesign('login-container');
  const appStore = useAppStore();
  const getSysConfig = computed(() => appStore.getSysConfigInfo);

  function gotoForgot() {
    router.push('/forgot');
  }
  function gotoSignup() {
    router.push('/signup');
  }
</script>
<style lang="scss">
  @import url('./index.scss');
</style>
